﻿@model IEnumerable<ePrice.Models.Product>

@{
    ViewBag.Title = "Index";
}

<h2>Index</h2>

<p>
    @Html.ActionLink("Create New", "Create")
</p>
<table>
    <tr>
        <th>
            ProductName
        </th>
        <th>
            ProductCode
        </th>
        <th>
            ProductFullName
        </th>
        <th>
            ProductDescription
        </th>
        <th>
            ProductImageURL
        </th>
        <th>
            ProductThumbImage
        </th>
        <th>
            ProductViewedCount
        </th>
        <th>
            ProductLikedCount
        </th>
        <th>
            ProductDislikedCount
        </th>
        <th>
            ProductReviewerVoteAverage
        </th>
        <th>
            ProductUserVoteAverage
        </th>
        <th>
            ProductPriority
        </th>
        <th>
            CreatedTime
        </th>
        <th>
            LastModifiedTime
        </th>
        <th>
            ManufactureId
        </th>
        <th>
            CategoryId
        </th>
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr>
        <td>
            @Html.DisplayFor(modelItem => item.ProductName)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.ProductCode)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.ProductFullName)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.ProductDescription)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.ProductImageURL)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.ProductThumbImage)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.ProductViewedCount)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.ProductLikedCount)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.ProductDislikedCount)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.ProductReviewerVoteAverage)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.ProductUserVoteAverage)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.ProductPriority)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.CreatedTime)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.LastModifiedTime)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.ManufactureId)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.CategoryId)
        </td>
        <td>
            @Html.ActionLink("Edit", "Edit", new { id=item.ProductId }) |
            @Html.ActionLink("Details", "Details", new { id=item.ProductId }) |
            @Html.ActionLink("Delete", "Delete", new { id=item.ProductId })
        </td>
    </tr>
}

</table>
